package com.dingreading.cloud.admin.util;

import org.apache.commons.collections4.CollectionUtils;

import java.util.List;

public class AdminStaffRoleUtil {

    /**
     * 角色是否是超管
     */
    public static boolean isSuperAdmin(List<String> identifyList) {
        if (CollectionUtils.isNotEmpty(identifyList) && identifyList.contains(AdminStaffRoleEnum.SUPER_ADMIN.getIdentify()))
            return true;
        return false;
    }

    /**
     * 角色是否是财务
     */
    public static boolean isFinance(List<String> identifyList) {
        if (CollectionUtils.isNotEmpty(identifyList) && identifyList.contains(AdminStaffRoleEnum.FINANCE.getIdentify()))
            return true;
        return false;
    }

    /**
     * 角色是否是经理
     */
    public static boolean isManager(List<String> identifyList) {
        if (CollectionUtils.isNotEmpty(identifyList) && identifyList.contains(AdminStaffRoleEnum.LEADER.getIdentify()))
            return true;
        return false;
    }

    /**
     * 角色是否是运营
     */
    public static boolean isOperate(List<String> identifyList) {
        if (CollectionUtils.isNotEmpty(identifyList) && identifyList.contains(AdminStaffRoleEnum.OPERATE.getIdentify()))
            return true;
        return false;
    }

    /**
     * 角色是否是运营督导
     */
    public static boolean isSupervise(List<String> identifyList) {
        if (CollectionUtils.isNotEmpty(identifyList) && identifyList.contains(AdminStaffRoleEnum.OPERATE.getIdentify()))
            return true;
        return false;
    }

}
